package com.doucome.snapshot.tools
{
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	
	/**
	 * ...
	 * @author wkl
	 */
	public class DisplayUtil
	{
		
		public function DisplayUtil()
		{
		
		}
		
		public static function removeChild(displayObjct:DisplayObjectContainer):void
		{
			var child:DisplayObject;
			for (var i:uint = 0; i < displayObjct.numChildren; i++)
			{
				child = displayObjct.getChildAt(i);
				if (displayObjct.getChildAt(i) is DisplayObjectContainer)
				{
					removeChild(DisplayObjectContainer (child));
				}
				
				delete(displayObjct.getChildAt(i));
				displayObjct.removeChild(displayObjct.getChildAt(i));
				
				
			}
		}
	}

}